I believe you could do it like this : var fd = new FormData(); fd.append( 'file', input.files[0] ); $.ajax({ url: 'http://example.com/script.php', data: fd, ... ... <看更多>
Search
Search
I believe you could do it like this : var fd = new FormData(); fd.append( 'file', input.files[0] ); $.ajax({ url: 'http://example.com/script.php', data: fd, ... ... <看更多>
$.ajax({ url : "http://localhost:8080/STS/rest/user", type : "POST", data : $( '#postForm').serialize(), success : function(data) { $( '# ... ... <看更多>
我有一個文章功能一個表單中是用以下去給ajax formData = new FormData($('#form')[0]);. ajax type: "POST", url: "url", data: formData, ... ... <看更多>
How to send a file or formdata with jQuery is brought up a lot at StackOverflow I think you should do things better by trying to understand ... ... <看更多>
Uploading Audio Files Using FormData & Ajax. This is the first in a series of posts about Feedback, a collaborative audio recording app that ... ... <看更多>
Try using .serialize() instead of FormData function step1SaveData(){ var formData = jQuery('#tpform1').serialize(); console.log(formData); jQuery.ajax({ ... ... <看更多>